package router

import (
	"github.com/gin-gonic/gin"

	"easygo/internal/controller"
	"easygo/pkg/jwt"
)

// Router 路由管理器
type Router struct {
	UserAPI *controller.User
	TestAPI *controller.Test
	Jwt     *jwt.Jwt
}

func GetRouterInstance() *Router {
	return &Router{
		UserAPI: controller.GetUserController(),
		TestAPI: controller.GetTestInstance(),
		Jwt:     jwt.GetJwtInstance(),
	}
}

// Register 注册路由
func (a *Router) Register(app *gin.Engine) {
	a.registerAPI(app)
}
